<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>虚拟风按钮</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
  <style>
    ul {
      width: 310px;
      background: #ebf5fc;
      border-radius: 10px;
      padding: 10px;
      box-shadow: -2px -2px 5px white, 3px 3px 5px rgba(0, 0, 0, 0.1);
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
      margin: 50px auto;
    }

    ul li {
      position: relative;
      list-style: none;
      text-align: center;
      margin: 15px;
    }

    label .icon-box .fa {
      font-size: 30px;
      color: #6a9bd8;
    }

    .icon-box {
      width: 60px;
      height: 60px;
      background: #ebf5fc;
      display: flex;
      justify-content: center;
      align-items: center;
      box-shadow: -2px -2px 5px white, 3px 3px 5px rgba(0, 0, 0, 0.1);
      border-radius: 10px;
    }

    label {
      position: relative;
      cursor: pointer;
    }

    input[type="checkbox"] {
      position: absolute;
      opacity: 0;
    }

    input:checked~.icon-box {
      box-shadow: inset -2px -2px 5px white, inset 3px 3px 5px rgba(0, 0, 0, 0.1);
    }

    input:checked~.icon-box .fa {
      transform: scale(0.95);
    }
  </style>
</head>

<body>
  <ul>
    <li>
      <label>
        <input type="checkbox" checked="">
        <div class="icon-box">
          <i class="fa fa-home"></i>
        </div>
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox">
        <div class="icon-box">
          <i class="fa fa-phone"></i>
        </div>
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox">
        <div class="icon-box">
          <i class="fa fa-plane"></i>
        </div>
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox">
        <div class="icon-box">
          <i class="fa fa-snowflake-o"></i>
        </div>
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox">
        <div class="icon-box">
          <i class="fa fa-battery-full"></i>
        </div>
      </label>
    </li>
    <li>
      <label>
        <input type="checkbox">
        <div class="icon-box">
          <i class="fa fa-code"></i>
        </div>
      </label>
    </li>
  </ul>
</body>

</html>